package org.byqh.dqeai.enums;

public enum SystemEnum {
    DELETEED("DELETEED", "1"),
    NOT_DELETEED("NOT_DELETEED", "2"),
    RECEIVED_ORDER("RECEIVED_ORDER", "1"),
    CAN_NOT_RECEIVED_TWICE("CAN_NOT_RECEIVED_TWICE", "无法重复接单"),
    UP("UP", "2"),// 上架
    DOWN("DOWN", "1"),// 下架
    NOT_RECEIVED_ORDER("NOT_RECEIVED_ORDER", "2");

    private String name;
    private String value;

    public static String getValue(SystemEnum systemEnum) {
        return systemEnum.getValue();
    }

    private SystemEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }

    public String getName() {
        return name;
    }

    /**
     * 用户操作枚举
     */
    public enum USER_OPREATION_ENUM {
        /**
         * -------------------------系统配置------------------------
         */
        PLEASE_LOGIN("请登录"),
        PLEASE_SELECT_GOODS("请选择商品和数量"),
        OPERATION_SUCCESS("操作成功"),
        PLEASE_INPUT_PASSWORD("请输入密码"),
        LOGIN_FAIL("用户名或密码错误"),
        PARAMS_NULL("参数为空"),
        WRONG_CONFIRM("确认密码输入错误"),
        WRONG_PASSWORD("密码错误"),
        OPERATION_FAIL("操作失败");
        /**
         * -------------------------系统配置------------------------
         */
        private String value;

        public static String getValue(USER_OPREATION_ENUM userOpreationEnum) {
            return userOpreationEnum.getValue();
        }

        private USER_OPREATION_ENUM(String value) {
            this.value = value;
        }

        public String getValue() {
            return this.value;
        }
    }

    /**
     * 任务执行状态
     */
    public enum JOB_EXEC_STATUS {
        /**
         * -------------------------成功------------------------
         */
        SUCCESS("0"),
        FAIL("1");
        /**
         * -------------------------失败------------------------
         */
        private String value;

        public static String getValue(JOB_EXEC_STATUS jobExecStatus) {
            return jobExecStatus.getValue();
        }

        private JOB_EXEC_STATUS(String value) {
            this.value = value;
        }

        public String getValue() {
            return this.value;
        }
    }

    /**
     * token枚举
     */
    public enum TOKEN_ENUM {
        /**
         * -------------------------token------------------------
         */
        OUTER_SERVICES_HEADER("OUTER_SERVICES_HEADER", "Authorization"),// 外部访问鉴权头
        INNER_SERVICES_HEADER("INNER_SERVICES_HEADER", "userid"),       // 内部访问鉴权头
        USER_INFO_ID("ID", "id"),                                       // 主键
        USER_INFO_REALNAME("REALNAME", "realname"),                     // 真实姓名
        USER_INFO_USERNAME("USERNAME", "username"),                     // 用户名
        USER_INFO_EXINFO("EXINFO", "exinfo");                           // 额外的信息
        /**
         * -------------------------未知服务源------------------------
         */
        private String name;
        private String value;

        public static String getValue(TOKEN_ENUM tokenEnum) {
            return tokenEnum.getValue();
        }

        private TOKEN_ENUM(String name, String value) {
            this.name = name;
            this.value = value;
        }

        public String getName() {
            return this.name;
        }

        public String getValue() {
            return this.value;
        }
    }

    /**
     * HTTP状态枚举
     */
    public enum HTTP_STATUS_ENUM {
        /**
         * -------------------------题库------------------------
         */
        WRONG_STATUS("WRONG_STATUS", "666"),                             // 验证码非法
        /**
         * -------------------------题库------------------------
         */

        /**
         * -------------------------未知服务源------------------------
         */
        UNKNOWN("UNKNOWN", "UNKNOWN");
        /**
         * -------------------------未知服务源------------------------
         */
        private String name;
        private String value;

        public static String getValue(HTTP_STATUS_ENUM httpStatusEnum) {
            return httpStatusEnum.getValue();
        }

        private HTTP_STATUS_ENUM(String name, String value) {
            this.name = name;
            this.value = value;
        }

        public String getName() {
            return this.name;
        }

        public String getValue() {
            return this.value;
        }
    }

//    /**
//     * 系统错误枚举
//     */
//    public enum SYSTEM_ERROR_ENUM {
//        /**
//         * -------------------------系统配置------------------------
//         */
//        ERROR("发生错误，请稍后重试"),
//        DEFAULT("发生未知错误，请稍后重试");
//        /**
//         * -------------------------系统配置------------------------
//         */
//        private String value;
//
//        public static String getValue(SYSTEM_ERROR_ENUM systemErrorEnum) {
//            return systemErrorEnum.getValue();
//        }
//
//        private SYSTEM_ERROR_ENUM(String value) {
//            this.value = value;
//        }
//
//        public String getValue() {
//            return this.value;
//        }
//    }
}
